<template>
  <div>
    御剑乘风来,除魔天地间!==slot
    <hr />
    <el-tables :data="tableData">
      <!-- <template #qq> 123 </template> -->
      <!-- <template v-slot:qq> 123 </template> -->
      <!-- <template slot="qq">123</template> -->
      <!-- <template slot-scope="scope"> -->
      <template #default="scope">
        <pre>{{ scope.row }}</pre>
        <el-button @click="del(scope.row.id)">删除</el-button>
      </template>
    </el-tables>
  </div>
</template>
<script>
import list from './component/list.vue'
export default {
  name: '',
  components: {
    elTables: list
  },
  data () {
    return {
      tableData: [
        { id: 1, name: 'jack' },
        { id: 2, name: 'rose' },
        { id: 3, name: 'tom' }
      ]
    }
  },
  created () {},
  computed: {},
  methods: {
    del (id) {
      this.tableData = this.tableData.filter((item) => item.id !== id)
    }
  }
}
</script>
<style lang='less'  scoped>
</style>
